
#ifndef Catch_h
#define Catch_h

#include "els_vm_bytecode.h"

extern struct _CERROR {
    char *kind;
    Object function;
    int nParams;
    int nResults;
} ElsVmFallBackSitu[];

#define _CERROR_ERROR  0
#define _CERROR_INDEX  1
#define _CERROR_GETTABLE  2
#define _CERROR_ARITH  3
#define _CERROR_ORDER  4
#define _CERROR_CONCAT  5
#define _CERROR_SETTABLE  6
#define _CERROR_GC 7
#define _CERROR_FC 8

void els_vm_setfallback (void);
int els_vm_lock (Object *object);
Object *els_vm_getlocked (int ref);
void els_vm_travlock (int (*fn)(Object *));
char *els_vm_travfallbacks (int (*fn)(Object *));

#endif

